.class public Les/f8;
.super Ljava/lang/Object;
.source "ScreenDecorationSource.java"


# instance fields
.field private final a:Ljava/util/List;
    .annotation system Ldalvik/annotation/Signature;
        value = {
            "Ljava/util/List<",
            "Les/g8;",
            ">;"
        }
    .end annotation
.end field

.field private b:Ljava/util/Comparator;
    .annotation system Ldalvik/annotation/Signature;
        value = {
            "Ljava/util/Comparator<",
            "Les/g8;",
            ">;"
        }
    .end annotation
.end field

.field private c:Les/t8;


# direct methods
.method public constructor <init>(Ljava/util/List;)V
    .locals 2
    .annotation system Ldalvik/annotation/Signature;
        value = {
            "(",
            "Ljava/util/List<",
            "Les/g8;",
            ">;)V"
        }
    .end annotation

    .line 1
    invoke-direct {p0}, Ljava/lang/Object;-><init>()V

    if-eqz p1, :cond_2

    .line 2
    invoke-interface {p1}, Ljava/util/List;->isEmpty()Z

    move-result v0

    if-eqz v0, :cond_0

    goto :goto_1

    .line 3
    :cond_0
    new-instance v0, Ljava/util/ArrayList;

    invoke-interface {p1}, Ljava/util/List;->size()I

    move-result v1

    invoke-direct {v0, v1}, Ljava/util/ArrayList;-><init>(I)V

    iput-object v0, p0, Les/f8;->a:Ljava/util/List;

    .line 4
    invoke-interface {v0, p1}, Ljava/util/List;->addAll(Ljava/util/Collection;)Z

    const/4 v0, 0x0

    .line 5
    :goto_0
    invoke-interface {p1}, Ljava/util/List;->size()I

    move-result v1

    if-ge v0, v1, :cond_1

    .line 6
    invoke-interface {p1, v0}, Ljava/util/List;->get(I)Ljava/lang/Object;

    move-result-object v1

    check-cast v1, Les/g8;

    iput v0, v1, Les/g8;->j:I

    add-int/lit8 v0, v0, 0x1

    goto :goto_0

    .line 7
    :cond_1
    iget-object p1, p0, Les/f8;->a:Ljava/util/List;

    new-instance v0, Les/f8$a;

    invoke-direct {v0, p0}, Les/f8$a;-><init>(Les/f8;)V

    invoke-static {p1, v0}, Ljava/util/Collections;->sort(Ljava/util/List;Ljava/util/Comparator;)V

    .line 8
    new-instance p1, Les/f8$b;

    invoke-direct {p1, p0}, Les/f8$b;-><init>(Les/f8;)V

    iput-object p1, p0, Les/f8;->b:Ljava/util/Comparator;

    goto :goto_2

    :cond_2
    :goto_1
    const/4 p1, 0x0

    .line 9
    iput-object p1, p0, Les/f8;->a:Ljava/util/List;

    :goto_2
    return-void
.end method

.method private c()Les/t8;
    .locals 4

    .line 1
    iget-object v0, p0, Les/f8;->a:Ljava/util/List;

    const/4 v1, 0x0

    if-nez v0, :cond_0

    return-object v1

    .line 2
    :cond_0
    invoke-interface {v0}, Ljava/util/List;->iterator()Ljava/util/Iterator;

    move-result-object v0

    :cond_1
    invoke-interface {v0}, Ljava/util/Iterator;->hasNext()Z

    move-result v2

    if-eqz v2, :cond_2

    invoke-interface {v0}, Ljava/util/Iterator;->next()Ljava/lang/Object;

    move-result-object v2

    check-cast v2, Les/g8;

    .line 3
    iget-object v2, v2, Les/g8;->g:Ljava/lang/Object;

    instance-of v3, v2, Les/t8;

    if-eqz v3, :cond_1

    .line 4
    check-cast v2, Les/t8;

    return-object v2

    :cond_2
    return-object v1
.end method


# virtual methods
.method public a()J
    .locals 2

    .line 8
    invoke-direct {p0}, Les/f8;->c()Les/t8;

    move-result-object v0

    iput-object v0, p0, Les/f8;->c:Les/t8;

    if-eqz v0, :cond_0

    .line 9
    invoke-virtual {v0}, Les/t8;->b()J

    move-result-wide v0

    return-wide v0

    :cond_0
    const-wide/16 v0, -0x1

    return-wide v0
.end method

.method public a(J)Z
    .locals 1

    .line 4
    iget-object v0, p0, Les/f8;->c:Les/t8;

    if-nez v0, :cond_0

    .line 5
    invoke-direct {p0}, Les/f8;->c()Les/t8;

    move-result-object v0

    iput-object v0, p0, Les/f8;->c:Les/t8;

    .line 6
    :cond_0
    iget-object v0, p0, Les/f8;->c:Les/t8;

    if-eqz v0, :cond_1

    .line 7
    invoke-virtual {v0, p1, p2}, Les/t8;->a(J)Z

    :cond_1
    const/4 p1, 0x1

    return p1
.end method

.method public a(Landroid/util/Pair;)Z
    .locals 3
    .annotation system Ldalvik/annotation/Signature;
        value = {
            "(",
            "Landroid/util/Pair<",
            "Ljava/lang/Long;",
            "Ljava/lang/Long;",
            ">;)Z"
        }
    .end annotation

    .line 1
    iget-object v0, p0, Les/f8;->a:Ljava/util/List;

    const/4 v1, 0x0

    if-nez v0, :cond_0

    return v1

    .line 2
    :cond_0
    invoke-interface {v0}, Ljava/util/List;->iterator()Ljava/util/Iterator;

    move-result-object v0

    :cond_1
    invoke-interface {v0}, Ljava/util/Iterator;->hasNext()Z

    move-result v2

    if-eqz v2, :cond_2

    invoke-interface {v0}, Ljava/util/Iterator;->next()Ljava/lang/Object;

    move-result-object v2

    check-cast v2, Les/g8;

    .line 3
    iget-object v2, v2, Les/g8;->i:Landroid/util/Pair;

    invoke-static {p1, v2}, Lcom/esfile/screen/recorder/media/util/x;->a(Landroid/util/Pair;Landroid/util/Pair;)Z

    move-result v2

    if-eqz v2, :cond_1

    const/4 p1, 0x1

    return p1

    :cond_2
    return v1
.end method

.method public b(J)Ljava/util/List;
    .locals 6
    .annotation system Ldalvik/annotation/Signature;
        value = {
            "(J)",
            "Ljava/util/List<",
            "Les/g8;",
            ">;"
        }
    .end annotation

    .line 1
    iget-object v0, p0, Les/f8;->a:Ljava/util/List;

    const/4 v1, 0x0

    if-nez v0, :cond_0

    return-object v1

    .line 2
    :cond_0
    new-instance v0, Ljava/util/ArrayList;

    invoke-direct {v0}, Ljava/util/ArrayList;-><init>()V

    .line 3
    new-instance v2, Ljava/util/ArrayList;

    invoke-direct {v2}, Ljava/util/ArrayList;-><init>()V

    .line 4
    iget-object v3, p0, Les/f8;->a:Ljava/util/List;

    invoke-interface {v3}, Ljava/util/List;->iterator()Ljava/util/Iterator;

    move-result-object v3

    :goto_0
    invoke-interface {v3}, Ljava/util/Iterator;->hasNext()Z

    move-result v4

    if-eqz v4, :cond_2

    invoke-interface {v3}, Ljava/util/Iterator;->next()Ljava/lang/Object;

    move-result-object v4

    check-cast v4, Les/g8;

    .line 5
    iget-object v5, v4, Les/g8;->i:Landroid/util/Pair;

    invoke-static {p1, p2, v5}, Lcom/esfile/screen/recorder/media/util/x;->a(JLandroid/util/Pair;)Z

    move-result v5

    if-eqz v5, :cond_1

    .line 6
    invoke-interface {v2, v4}, Ljava/util/List;->add(Ljava/lang/Object;)Z

    goto :goto_0

    .line 7
    :cond_1
    iget-object v5, v4, Les/g8;->i:Landroid/util/Pair;

    invoke-static {p1, p2, v5}, Lcom/esfile/screen/recorder/media/util/x;->b(JLandroid/util/Pair;)Z

    move-result v5

    if-eqz v5, :cond_2

    .line 8
    invoke-interface {v0, v4}, Ljava/util/List;->add(Ljava/lang/Object;)Z

    goto :goto_0

    .line 9
    :cond_2
    iget-object p1, p0, Les/f8;->a:Ljava/util/List;

    invoke-interface {p1, v2}, Ljava/util/List;->removeAll(Ljava/util/Collection;)Z

    .line 10
    invoke-interface {v0}, Ljava/util/List;->size()I

    move-result p1

    const/4 p2, 0x1

    if-le p1, p2, :cond_3

    .line 11
    iget-object p1, p0, Les/f8;->b:Ljava/util/Comparator;

    invoke-static {v0, p1}, Ljava/util/Collections;->sort(Ljava/util/List;Ljava/util/Comparator;)V

    .line 12
    :cond_3
    invoke-interface {v0}, Ljava/util/List;->size()I

    move-result p1

    if-lez p1, :cond_4

    move-object v1, v0

    :cond_4
    return-object v1
.end method

.method public b()V
    .locals 1

    .line 13
    iget-object v0, p0, Les/f8;->a:Ljava/util/List;

    if-eqz v0, :cond_0

    .line 14
    invoke-interface {v0}, Ljava/util/List;->clear()V

    :cond_0
    const/4 v0, 0x0

    .line 15
    iput-object v0, p0, Les/f8;->c:Les/t8;

    return-void
.end method
